package initialize

import (
	"fmt"
	"go.uber.org/zap"
)

func InitZap() {
	zapconfig := zap.NewDevelopmentConfig()
	zapconfig.OutputPaths = []string{
		"./api/week3.log",
		"stdout",
	}
	logg, err := zapconfig.Build()
	if err != nil {
		fmt.Println("日志编译失败", err)
		return
	}
	zap.ReplaceGlobals(logg)
}
